#pragma once

#pragma warning(push)
#pragma warning(disable:4251)


#include "CoolUIDefine.h"
#include <vector>
using namespace std;

class CUIRect;

enum STRETCHDIR
{
    STRETCH_HORIZONTAL,
    STRETCH_VERICAL,
    STRETCH_BOTH
};

class COOLUI_CLASS CUIImgSplitBlock
{
public:
    CUIImgSplitBlock( int iLeft, int iTop, int iWidth, int iHeight, STRETCHDIR StretchType, float scale );
    virtual ~CUIImgSplitBlock();

    CUIRect* m_pRect;
    CUIRect* m_pDestRect;
    STRETCHDIR m_enumStretchDir;
    float m_fscale;
};

class COOLUI_CLASS CUIImgSplit
{
public:
    CUIImgSplit( void );
    virtual ~CUIImgSplit( void );
public:
    void AddSplitBlock( CUIImgSplitBlock* pBlock );
    int GetSplitBlockCount()const;
    CUIImgSplitBlock* GetSplitBlock( int iIndex );
private:
    vector<CUIImgSplitBlock*> m_vecBlock;
};

#pragma warning(pop)

